package com.magi.builder;

import org.dom4j.DocumentHelper;

public class DynamicXmlSQLBuilder {
    public String getWhere(String body) {
        return "<where>" + body + "</where>";
    }

    public String getSet(String body) {
        return "<set>" + body + "</set>";
    }

    public String getIf(String test, String body) {
        return DocumentHelper.createElement("if")
                .addAttribute("test", test)
                .addText(body)
                .asXML();
    }
}
